<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Generator" content="Asbru Web Content Editor">
<meta http-equiv="Copyright" content="(C) 2002-2006 - Asbru Ltd. - www.asbrusoft.com">
<script type="text/javascript" src="webeditor.properties.js"></script>
<title>Asbru Web Content Editor</title>
<link rel="stylesheet" type="text/css" href="webeditor.css">
<script type="text/javascript">

document.title = HtmlDecode(Text('button_title'));

function requestParameter(name) {
	var value = "";
	if (start = request.indexOf("?"+name+"=")+1) {
		value = request.substring(start+name.length+1);
	} else if (start = request.indexOf("&"+name+"=")+1) {
		value = request.substring(start+name.length+1);
	}
	if (value.indexOf("&")+1) {
		value = value.substring(0, value.indexOf("&"));
	}
	value = unescape(value);
	return value;
}

window.focus();
var request = "" + window.location;
editor = requestParameter("editor");

function initform() {
	document.forms[0].type.value = unescape(request.match(new RegExp("^.*\?.*[?&]type=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]type=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].name.value = unescape(request.match(new RegExp("^.*\?.*[?&]name=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]name=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].value.value = unescape(request.match(new RegExp("^.*\?.*[?&]value=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]value=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].src.value = unescape(request.match(new RegExp("^.*\?.*[?&]src=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]src=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].align.value = unescape(request.match(new RegExp("^.*\?.*[?&]align=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]align=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].onclick.value = unescape(request.match(new RegExp("^.*\?.*[?&]onclick=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]onclick=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].onfocus.value = unescape(request.match(new RegExp("^.*\?.*[?&]onfocus=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]onfocus=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].onblur.value = unescape(request.match(new RegExp("^.*\?.*[?&]onblur=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]onblur=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].htmlclass.value = unescape(request.match(new RegExp("^.*\?.*[?&]htmlclass=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]htmlclass=([^&]+).*$", "i"), "$1") : "");
	document.forms[0].htmlid.value = unescape(request.match(new RegExp("^.*\?.*[?&]htmlid=([^&]+).*$", "i"), "$1") ? request.replace(new RegExp("^.*?.*[?&]htmlid=([^&]+).*$", "i"), "$1") : "");
	changetype(document.forms[0]);
}

function insertbutton(form) {
	var type = form.type.value;
	var name = form.name.value;
	var value = form.value.value;
	var src = form.src.value;
	var align = form.align.value;
	var onclick = form.onclick.value;
	var onfocus = form.onfocus.value;
	var onblur = form.onblur.value;
	var htmlclass = form.htmlclass.value;
	var htmlid = form.htmlid.value;
	window.opener[editor].insertButton(type,name,value,src,align,onclick,onfocus,onblur,htmlclass,htmlid);
	window.close();
}

function changetype(form) {
	if (form.type.value == "image") {
		form.src.disabled = false;
		form.align.disabled = false;
	} else {
		form.src.disabled = true;
		form.align.disabled = true;
	}
}

</script>
</head>
<body onLoad="initform();">
<form action="#" onSubmit="javascript:insertbutton(this); return false;">
<input type="hidden" name="onfocus" value="">
<input type="hidden" name="onblur" value="">
<table width="100%" border="0" class="dtree">
	<tr align="left" valign="top"> 
		<td colspan="4" class="webeditor_window_title"><script type="text/javascript">document.write(Text('button_title'));</script></td>
	</tr>
	<tr align="left" valign="top"> 
		<td colspan="4">
			<fieldset>
			<legend class="webeditor_window_heading"><script type="text/javascript">document.write(Text('button_parameter'));</script></legend>
				<table width="100%">
					<tr>
						<td class="webeditor_window_attribute"><script type="text/javascript">document.write(Text('button_parameter_name'));</script></td>
						<td class="webeditor_window_value"> 
							<input type="text" name="name" size="20" value="">
						</td>
						<td></td>
						<td class="webeditor_window_attribute"><script type="text/javascript">document.write(Text('button_parameter_value'));</script></td>
						<td class="webeditor_window_value"> 
							<input type="text" name="value" size="20" value="">
						</td>
					</tr>
				</table>
			</fieldset>
		</td>
	</tr>
	<tr align="left" valign="top"> 
		<td colspan="2" width="50%">
			<fieldset>
			<legend class="webeditor_window_heading"><script type="text/javascript">document.write(Text('button_type'));</script></legend>
				<table width="100%">
					<tr>
						<td class="webeditor_window_attribute"><script type="text/javascript">document.write(Text('button_type_type'));</script></td>
						<td class="webeditor_window_value"> 
							<select name="type" style="width: 145px;" onchange="changetype(this.form);">
								<script type="text/javascript">
								document.write('<option value="" selected>');
								document.write('<option value="submit">' + Text('button_type_type_submit'));
								document.write('<option value="button">' + Text('button_type_type_button'));
								document.write('<option value="reset">' + Text('button_type_type_reset'));
								document.write('<option value="image">' + Text('button_type_type_image'));
								</script>
							</select>
						</td>
						<td></td>
					</tr>
				</table>
			</fieldset>
		</td>
		<td colspan="2" width="50%">
			<fieldset>
			<legend class="webeditor_window_heading"><script type="text/javascript">document.write(Text('button_events'));</script></legend>
				<table width="100%">
					<tr>
						<td class="webeditor_window_attribute"><script type="text/javascript">document.write(Text('button_events_onclick'));</script></td>
						<td class="webeditor_window_value"> 
							<input type="text" name="onclick" size="20" value="">
						</td>
						<td></td>
					</tr>
				</table>
			</fieldset>
		</td>
	</tr>
	<tr align="left" valign="top"> 
		<td colspan="4">
			<fieldset>
			<legend class="webeditor_window_heading"><script type="text/javascript">document.write(Text('button_image'));</script></legend>
				<table width="100%">
					<tr>
						<td class="webeditor_window_attribute"><script type="text/javascript">document.write(Text('button_image_url'));</script></td>
						<td class="webeditor_window_value"> 
							<input type="text" name="src" size="20" value="">
						</td>
						<td></td>
						<td class="webeditor_window_attribute"><script type="text/javascript">document.write(Text('button_image_align'));</script></td>
						<td class="webeditor_window_value"> 
							<select name="align" style="width: 145px;">
								<script type="text/javascript">
								document.write('<option value="">' + Text('button_image_align_default'));
								document.write('<option value="top">' + Text('button_image_align_top'));
								document.write('<option value="middle">' + Text('button_image_align_middle'));
								document.write('<option value="bottom">' + Text('button_image_align_bottom'));
								</script>
							</select>
						</td>
					</tr>
				</table>
			</fieldset>
		</td>
	</tr>
	<tr align="left" valign="top"> 
		<td colspan="4">
			<fieldset>
			<legend class="webeditor_window_heading"><script type="text/javascript">document.write(Text('class_id'));</script></legend>
				<table width="100%">
					<tr>
						<td class="webeditor_window_attribute"><script type="text/javascript">document.write(Text('htmlclass'));</script></td>
						<td class="webeditor_window_value"> 
							<input type="text" name="htmlclass" size="20" value="">
						</td>
						<td></td>
						<td class="webeditor_window_attribute"><script type="text/javascript">document.write(Text('htmlid'));</script></td>
						<td class="webeditor_window_value"> 
							<input type="text" name="htmlid" size="20" value="">
						</td>
					</tr>
				</table>
			</fieldset>
		</td>
	</tr>
</table>
<br>
<div align="center">
<script type="text/javascript">document.write('<input type="submit" value="' + Text('ok') + '">');</script>
<script type="text/javascript">document.write('<input type="button" value="' + Text('cancel') + '" onClick="window.close()">');</script>
</div>
</form>
</body>
</html>
